<html>
<head>
  <meta http-equiv="refresh" content="<?php echo $_GET['refresh']; ?>" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

<?php
ob_implicit_flush();
$filepath = $_GET['target'];
$url = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
echo "tail -n {$_GET['line']} $filepath <br />";
exec("tail -n {$_GET['line']} $filepath", $ret);
foreach ($ret as $out) {
  echo "$out<br />";
}

?>
</body>
</html>
